package com.zkingsoft.model;

/**
 * @project Fusion-Common
 * @package com.fusionzoom.common.utils
 * @class PaginationVO.java
 * @author jiagui E-mail:<zhujiagui@zkingsoft.com>
 * @date 2015年9月9日 下午5:51:43
 * @description 分页信息类
 */
public class PaginationVO {
	private Integer pageNow = 1;
	private Integer pageSize = 10;
	private Integer pageCount = 0;
	private Integer totalRecold;
	private Integer pageIndex;
	private String sortField;

	public Integer getMin() {
		return (pageNow - 1) * pageSize;
	}

	

	public Integer getPageIndex() {
		this.pageIndex=(pageNow-1)*pageSize;
		return pageIndex;
	}


	public void setPageIndex(Integer pageIndex) {
		this.pageIndex = pageIndex;
	}





	public String getSortField() {
		return sortField;
	}

	public void setSortField(String sortField) {
		this.sortField = sortField;
	}

	public Integer getPageNow() {
		return pageNow;
	}

	public void setPageNow(Integer pageNow) {
		this.pageNow = pageNow;
	}

	public Integer getPageSize() {
		return pageSize;
	}

	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}

	public Integer getPageCount() {
		return pageCount;
	}

	public void setPageCount(Integer pageCount) {
		this.pageCount = pageCount;
	}

	public Integer getTotalRecold() {
		return totalRecold;
	}

	public void setTotalRecold(Integer totalRecold) {
		if (totalRecold % pageSize == 0) {
			this.pageCount = totalRecold / pageSize;
		} else {
			this.pageCount = totalRecold / pageSize + 1;
		}

		this.totalRecold = totalRecold;
	}

}
